.class public Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;
.super Ljava/lang/Object;
.source "RankingUserCategoryModel.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field private static final serialVersionUID:J = -0x2f2166cd1f8c9da6L


# instance fields
.field public iconUrl:Ljava/lang/String;

.field public rankingName:Ljava/lang/String;

.field public rankingUserModels:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/RankingUserModel;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parseRankingUserCategoryModels(Lorg/json/JSONObject;)Ljava/util/ArrayList;
    .registers 7
    .param p0, "jsonObj"    # Lorg/json/JSONObject;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 16
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 18
    .local v2, "models":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;>;"
    const-string v5, "users_rank"

    invoke-virtual {p0, v5}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 19
    .local v1, "ja":Lorg/json/JSONArray;
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_c
    invoke-virtual {v1}, Lorg/json/JSONArray;->length()I

    move-result v5

    if-ge v0, v5, :cond_3d

    .line 20
    invoke-virtual {v1, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    .line 21
    .local v3, "rankingJson":Lorg/json/JSONObject;
    new-instance v4, Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;

    invoke-direct {v4}, Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;-><init>()V

    .line 22
    .local v4, "rankingUserCategoryModel":Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;
    const-string v5, "name"

    invoke-virtual {v3, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v4, Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;->rankingName:Ljava/lang/String;

    .line 23
    const-string v5, "icon_image"

    invoke-virtual {v3, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v4, Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;->iconUrl:Ljava/lang/String;

    .line 24
    const-string v5, "users"

    invoke-virtual {v3, v5}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v5

    invoke-static {v5}, Lcom/brixd/niceapp/community/model/RankingUserModel;->parseRankingUserModels(Lorg/json/JSONArray;)Ljava/util/ArrayList;

    move-result-object v5

    iput-object v5, v4, Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;->rankingUserModels:Ljava/util/ArrayList;

    .line 26
    invoke-virtual {v2, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 19
    add-int/lit8 v0, v0, 0x1

    goto :goto_c

    .line 29
    .end local v3    # "rankingJson":Lorg/json/JSONObject;
    .end local v4    # "rankingUserCategoryModel":Lcom/brixd/niceapp/community/model/RankingUserCategoryModel;
    :cond_3d
    return-object v2
.end method
